package com.zdp.filesync.monitor.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 文件监听 相关配置信息
 */
@ConfigurationProperties(prefix = "file-monitor")
@Data
@Repository
public class FileMonitorConfig {

    private List<FileMonitorInfo> fileMonitorInfos;

    private Integer interval;


    public void copy(FileMonitorConfig fileMonitorConfig){
        this.fileMonitorInfos = fileMonitorConfig.getFileMonitorInfos();
        this.interval = fileMonitorConfig.getInterval();
    }

}
